﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMasterPage.master" AutoEventWireup="true"
    CodeFile="ChangePassword.aspx.cs" Inherits="Modeling_TeacherPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        #main
        {
            min-width: 1150px;
        }
        #center
        {
            margin-top: 15px;
        }
        #left
        {
            margin-top: 15px;
        }
        #dvLogin
        {
            margin: 15px auto 15px auto;
            border: thin solid #C0C0C0;
            width: 350px;
            height: 325px;
            background-color: #F1F1F1;
        }
        #tbLogin
        {
            width: 300px;
            margin-top: 15px;
            margin-right: auto;
            margin-left: auto;
        }
        #center1
        {
            width: 1000px;
            min-height: 500px;
            padding-top: 15px;
            margin-right: auto;
            margin-left: auto;
        }
        #center
        {
            width: 700px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="Server">
    <div id="center1">
        <div id="left">
            <table>
                <tr>
                    <td>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Students/TimeTable.aspx"
                            CssClass="LinkStyle1">Time Table</asp:HyperLink>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/Students/CourseSignUp.aspx"
                            CssClass="LinkStyle1">Courses Regis</asp:HyperLink>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Students/Scores.aspx"
                            CssClass="LinkStyle1">Check Scores</asp:HyperLink>
                    </td>
                </tr>
                <tr>
                    <td id="activeTD">
                        <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/Students/ChangePassword.aspx"
                            CssClass="activeLink">Change Password</asp:HyperLink>
                    </td>
                </tr>
            </table>
        </div>
        <div id="center">
            <table width="100%">
                <tr>
                    <td align="center">
                        <asp:Label ID="Label5" runat="server" Text="Change Password" Font-Size="20pt" ForeColor="#990033"></asp:Label>
                    </td>
                </tr>
            </table>
            <div id="dvLogin">
                <table id="tbLogin">
                    <tr>
                        <td height="75px" valign="top">
                            <asp:Label ID="Label1" runat="server" Text="Old Password" Font-Bold="True"></asp:Label>
                            <br />
                            <asp:TextBox ID="txtOldPassword" runat="server" TextMode="Password" Width="290px"
                                Height="25px" Font-Size="12pt" Wrap="True"></asp:TextBox>
                            <br />
                            <asp:Label ID="Label4" runat="server" Text="" ForeColor="Red"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Please! Input old password"
                                ControlToValidate="txtOldPassword" ValidationGroup="Change" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="Old password is incorrect!"
                                Display="Dynamic" ValidationGroup="Change" ControlToValidate="txtOldPassword"
                                OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
                        </td>
                    </tr>
                    <tr>
                        <td height="75px" valign="top">
                            <asp:Label ID="Label2" runat="server" Text="New Password" Font-Bold="True"></asp:Label>
                            <br />
                            <asp:TextBox ID="txtNewPassword" runat="server" TextMode="Password" Width="290px"
                                Height="25px" Font-Size="12pt"></asp:TextBox>
                            <br />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please! Input new password"
                                ControlToValidate="txtNewPassword" ValidationGroup="Change" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="CustomValidator2" runat="server" ErrorMessage="Password must in range 6 to 128 characters!"
                                Display="Dynamic" ValidationGroup="Change" ControlToValidate="txtNewPassword"
                                OnServerValidate="CustomValidator2_ServerValidate"></asp:CustomValidator>
                        </td>
                    </tr>
                    <tr>
                        <td height="90px" valign="top">
                            <asp:Label ID="Label3" runat="server" Text="Confirm Password" Font-Bold="True"></asp:Label>
                            <br />
                            <asp:TextBox ID="txtConfirmPassword" runat="server" TextMode="Password" Width="290px"
                                Height="25px" Font-Size="12pt"></asp:TextBox>
                            <br />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Please! Input confirm password"
                                ControlToValidate="txtConfirmPassword" ValidationGroup="Change" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="New password and confirm password not same!"
                                Display="Dynamic" ControlToValidate="txtNewPassword" ControlToCompare="txtConfirmPassword"
                                ValidationGroup="Change"></asp:CompareValidator>
                            <asp:CustomValidator ID="CustomValidator3" runat="server" ErrorMessage="Password must in range 6 to 128 characters!"
                                Display="Dynamic" ValidationGroup="Change" ControlToValidate="txtConfirmPassword"
                                OnServerValidate="CustomValidator3_ServerValidate"></asp:CustomValidator>
                        </td>
                    </tr>
                    <tr>
                        <td height="40px">
                            <asp:Button ID="btnChange" runat="server" Text="Change" Height="35px" Width="90px"
                                Font-Bold="True" ValidationGroup="Change" OnClick="btnChange_Click" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</asp:Content>
